#include<stdio.h>
int main() {
	int n;
	scanf_s("%d", &n);
	int t = n;
	int x = 1;
	while (n > 9) {
		n /= 10;
		x *= 10;
	}
	while (t > 0) {
		int d;
		d = t/x;
		printf("%d", d);
		if (x > 9)printf(" ");
		t %= x;
		x /= 10;
	}
}